POV-Ray : Newsgroups : povray.unofficial.patches : bicubic interpolation patch : Re: bicubic interpolation patch Server Time
28 Sep 2024 16:49:57 EDT (-0400)
  Re: bicubic interpolation patch  
From: Lutz-Peter Hooge
Date: 10 Jun 2003 22:28:07
Message: <3ee693b7$1@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:

> I'd just use type 3 for bicubic. If something else was originally 
> planned, it was so long ago that it makes no difference, and it fits in 
> with existing ones nicely.

Then IMHO CUBIC_SPLINE should be renamed to BICUBIC. 
(Or BILINEAR to LINEAR_SPLINE)

> I would leave them unclipped. Code that needs clipped values will clip 
> them itself, intermediate values that go out of the usual range are fine.

Ok.

> Are those coefficients random?

No, they are those used in the patch.

You get them by putting constraints to the cubic function,
then solving for the cofficients.

The constraints I used where:
-the interpolation should go through the original points
-the derivative at the edges of each segment is the 
 arithmetic mean of the two derivatives that linear interpolation
 would have left and right of that point 
 (sounds complicated, is simple).

You geht the cubic interpolation function out of the matrix M and
the four sample points like this (^t means: transposed):

(x^3,x^2,x,1) * (M * (f1,f2,f3,f4)^t)

> Maybe this would have some use, but can't think of any. Any special 
> effects this makes possible?

At least it should be possible to replicate linear and quadratic
interpolation with it.
But I think it is also possible to modify the matrix to get a sharper
image (with the tradeoff of getting more grid artifacts)

Lutz-Peter


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.